package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.CategoryAllBeen;
import cn.xfdzx.android.apps.shop.bean.ShopGoodsInfoBeen;
import cn.xfdzx.android.apps.shop.bean.ShopAddGoodBeen;
import cn.xfdzx.android.apps.shop.bean.ShopAddGoodTypeBeen;
import cn.xfdzx.android.apps.shop.bean.UpdateNumPriceBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface ShopAddGoodContract {
    interface Model {
        Flowable<ShopAddGoodBeen> addGood(String state,String title, String thumbs, String marketprice, String discountprice, String stock, String category_id, String store_category_id, String goods_weight, String unit);
        Flowable<ShopAddGoodBeen> updataGood(String id,String state,String title, String thumbs, String marketprice, String discountprice, String stock, String category_id, String store_category_id, String goods_weight, String unit);

        Flowable<CategoryAllBeen> initTypeData(String index_status);
        Flowable<ShopAddGoodTypeBeen> shopAddGoodType( );
        Flowable<ShopGoodsInfoBeen> goodsInfo(String id);

    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onAddGoodSuccess(ShopAddGoodBeen bean);
        void onUpdataSuccess(ShopAddGoodBeen bean);
        void onShopAddGoodTypeSuccess(ShopAddGoodTypeBeen bean,boolean is_visibility);
        void onGoodsInfoSuccess(ShopGoodsInfoBeen bean);


        void onInitTypeSuccess(CategoryAllBeen bean,int is_tiao);
    }

    interface Presenter {

        void addGood(String state,String title, String thumbs, String marketprice, String discountprice, String stock, String category_id, String store_category_id, String goods_weight, String unit);
        void updataGood(String id,String state,String title, String thumbs, String marketprice, String discountprice, String stock, String category_id, String store_category_id, String goods_weight, String unit);

        void initTypeData(String index_status,int is_tiao);
        void shopAddGoodType(boolean is_visibility);
        void goodsInfo( String id);

    }
}
